/* 公共样式建议最少使用，尽量封装进组件中 */

/* ------------------ AI Assistant 样式 ------------------ */
.ai-assistant-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid #ccc;
  border-radius: 8px;
  overflow: hidden;
  background-color: #fff;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.ai-assistant-container .chat-header {
  background-color: #4f46e5;
  color: white;
  padding: 12px;
  font-size: 18px;
  font-weight: bold;
}

.ai-assistant-container .chat-messages {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
  background-color: #f8f8f8;
}

.ai-assistant-container .chat-messages .user,
.ai-assistant-container .chat-messages .assistant {
  display: flex;
  margin-bottom: 10px;
}

.ai-assistant-container .chat-messages .user {
  justify-content: flex-end;
}

.ai-assistant-container .chat-messages .assistant {
  justify-content: flex-start;
}

.ai-assistant-container .message-bubble {
  max-width: 70%;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.4;
  word-break: break-word;
}

.ai-assistant-container .user .message-bubble {
  background-color: #e0f7fa;
  text-align: left;
}

.ai-assistant-container .assistant .message-bubble {
  background-color: #f1f8e9;
}

.ai-assistant-container .chat-input {
  display: flex;
  padding: 10px;
  border-top: 1px solid #ccc;
  background-color: #fff;
  gap: 10px;
}

.ai-assistant-container .chat-input input {
  flex: 1;
  min-height: 36px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.ai-assistant-container .chat-input button {
  padding: 8px 16px;
  background-color: #4f46e5;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.ai-assistant-container .chat-input button:active {
  transform: scale(0.96);
}

.ai-assistant-container .loading-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
}

.ai-assistant-container .spinner {
  border: 4px solid #ccc;
  border-top: 4px solid #4f46e5;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ------------------ Room Collaboration 样式 ------------------ */
.room-collab-container {
  max-width: 600px;
  /*margin: 40px auto;*/
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  background-color: #ffffff;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.room-collab-container h3 {
  text-align: center;
  margin-bottom: 20px;
  color: #333;
}

.room-collab-container input {
  width: 100%;
  padding: 10px;
  font-size: 14px;
  margin-bottom: 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-sizing: border-box;
}

.room-collab-container .room-buttons {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.room-collab-container .room-buttons button {
  flex: 1;
  padding: 10px;
  font-size: 14px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  background-color: #409eff;
  color: white;
  transition: background-color 0.3s ease;
}

.room-collab-container .room-buttons button:hover {
  background-color: #66b1ff;
}

.room-collab-container .room-message {
  margin-top: 10px;
  color: #e67e22;
  font-weight: bold;
  text-align: center;
}

.room-collab-container .room-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.room-collab-container .chat-box {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 12px;
  height: 400px;
  display: flex;
  flex-direction: column;
}

.room-collab-container .messages {
  flex: 1;
  overflow-y: auto;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.room-collab-container .message-user {
  align-self: flex-end;
  background-color: #daf1ff;
  padding: 8px 12px;
  border-radius: 16px;
  max-width: 70%;
  word-wrap: break-word;
}

.room-collab-container .message-other {
  align-self: flex-start;
  background-color: #f1f1f1;
  padding: 8px 12px;
  border-radius: 16px;
  max-width: 70%;
  word-wrap: break-word;
}

.room-collab-container .chat-input {
  display: flex;
  gap: 10px;
}

.room-collab-container .chat-input input {
  flex: 1;
}

.room-collab-container .chat-input button {
  flex-shrink: 0;
  padding: 10px 16px;
}
